// 封装用户的请求

import request from '../utils/request'
export const login = data => {
  return request({
    method: 'post',
    url: '/v1_0/authorizations',
    data
  })
}
export const sendCode = mobile => {
  return request({
    method: 'get',
    url: '/v1_0/sms/codes/' + mobile
  })
}
// 获取用户个人信息列表
export const getUserData = () => {
  return request({
    method: 'get',
    url: '/v1_0/user'
  })
}
// 获取频道列表
export const getUserPannel = () => {
  return request({
    method: 'get',
    url: '/v1_0/user/channels'
  })
}
// 获取用户添加
export const addUserfollwed = id => {
  return request({
    method: 'post',
    url: '/v1_0/user/followings',
    data: {
      target: id
    }
  })
}
// 用户取消
export const deleteUserfollwed = id => {
  return request({
    method: 'DELETE',
    url: '/v1_0/user/followings/' + id,
    data: {
      userId: id
    }
  })
}
